Testing Error Handling Code in Device Drivers Using Characteristic Fault Injection
نویسندگان
چکیده
Device drivers may encounter errors when communicating with OS kernel and hardware. However, error handling code often gets insufficient attention in driver development and testing, because these errors rarely occur in real execution. For this reason, many bugs are hidden in error handling code. Previous approaches for testing error handling code often neglect the characteristics of device drivers, so their efficiency and accuracy are limited. In this paper, we first study the source code of Linux drivers to find useful characteristics of error handling code. Then we use these characteristics in fault injection testing, and propose a novel approach named EH-Test, which can efficiently test error handling code in drivers. To improve the representativeness of injected faults, we design a pattern-based extraction strategy to automatically and accurately extract target functions which can actually fail and trigger error handling code. During execution, we use a monitor to record runtime information and pair checkers to check resource usages. We have evaluated EH-Test on 15 real Linux device drivers and found 50 new bugs in Linux 3.17.2. The code coverage is also effectively increased. Comparison experiments to previous related approaches also show the effectiveness of EH-Test.
منابع مشابه
SCSI Fault Injection Test
It has been widely recognized that the testing of Linux kernel is important. However, error handling code is one of the places where testing is difficult. In this paper, a new block I/O test tool is introduced. This makes testing of error handling codes easy. The new test tool has driver level fault injectors which have flexible and fully controllable interface for user level programs to simula...
متن کاملAccurate Fault Injection with Concolic Testing
Fault injection, modifying the behavior of a program to facilitate the reproduction of hidden or rare problems, is an effective technique for detecting modularity violations in programs, such as missing error handling and implementationdependent behavior. However, conventional randomized fault injection suffers from poor coverage relative to the number of tests that it runs. In this work, we in...
متن کاملUsing fault injection to increase software test coverage
During testing, it is nearly impossible to run all statments or branches of a program. It is especially difficult to test the code used to respond to exceptional conditions. This untested code, often the error recovery code, will tend to be an error prone part of a system. We show that test coverage can be increased through an “assertion violation” technique for injecting software faults during...
متن کاملException handling analysis and transformation using fault injection: Study of resilience against unanticipated exceptions
Context: In software, there are the error cases that are anticipated at specification and design time, those encountered at development and testing time, and those that were never anticipated before happening in production. Is it possible to learn from the anticipated errors during design to analyze and improve the resilience against the unanticipated ones in production? Objective: In this pape...
متن کاملPrediction of Fault-Prone Software Modules using Statistical and Machine Learning Methods
Demand for producing quality software has rapidly increased during the last few years. This is leading to increase in development of machine learning methods for exploring data sets, which can be used in constructing models for predicting quality attributes such as fault proneness, maintenance effort, testing effort, productivity and reliability. This paper examines and compares logistic regres...
متن کامل